package collection.Demo13;

import java.util.HashMap;

/**
 * @Author Miku
 * @Create 2021/4/19 17:09
 */
public class Test {
    public static void main(String[] args) {
        //创建集合
        HashMap<Student, String> students = new HashMap<>();
        //添加元素
        Student s1 = new Student("miku", 100);
        Student s2 = new Student("luka", 101);
        Student s3 = new Student("test", 102);
        students.put(s1,"北京");
        students.put(s2,"上海");
        students.put(s3,"杭州");

        System.out.println("元素个数:"+students.size());
        System.out.println(students);

    }
}
